package com.rd.student.jike.class4.xiayinyin.day0731;

import java.util.Arrays;

public class Exercises01 {
    public static void main(String[] args) {
        int[] arr = new int[20];
        for (int i = 0; i < 20; i++) {
            int a = (int)(Math.random()*50);
            boolean b = false;
            for (int j = 0; j < i; j++) {
                if(a == arr[j]){
                    b = true;
                    break;
                }
            }if(!b){
                arr[i] = a;
            }if(b){
                i--;
                continue;
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
